-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 filter global namespace while looking for cluster scoped resources #1520
🐛 filter global namespace while looking for cluster scoped resources #1520
Conversation
/kind bug |
Also a potential source of future bugs is this line, where the global cache non-namespace |
acb67ae
to
49b9d0a
Compare
Have moved the global cache creation above the loop, so that the |
In the current implementation of multinamespaced cache, we look at global namespace while listing objects from all namespaced. Global namespace should not be looked at while fetching namespaced resources.
49b9d0a
to
56f0e9b
Compare
56f0e9b
to
b865173
Compare
pkg/cache/multi_namespace_cache.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
informers[globalCache] = clusterCacheInf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could ideally create a separate informer in multiNamespaceInformer
for cluster scoped cache. But that's not needed for now, since the namespace is not specifically used in any of the methods.
/retest |
1 similar comment
/retest |
b865173
to
412bf7a
Compare
412bf7a
to
18e3e67
Compare
Signed-off-by: varshaprasad96 <[email protected]>
18e3e67
to
201ab80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, estroz, varshaprasad96 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This commit fixes a bug that was brought in long ago in kubernetes-sigs#1520. When the object's scope is not deterministic from the RESTMapper it should return an error instead of ignoring it. Signed-off-by: Varsha Prasad Narsing <[email protected]>
This commit fixes a bug that was brought in long ago in kubernetes-sigs#1520. When the object's scope is not deterministic from the RESTMapper it should return an error instead of ignoring it. Signed-off-by: Varsha Prasad Narsing <[email protected]>
This commit fixes a bug that was brought in long ago in kubernetes-sigs#1520. When the object's scope is not deterministic from the RESTMapper it should return an error instead of ignoring it. Signed-off-by: Varsha Prasad Narsing <[email protected]>
In the current implementation of multinamespaced cache, we look at
global namespace while listing objects from all namespaced. Global namespace
should not be looked at while fetching namespaced resources.